{% load staticfiles %}
<html>
<head>
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>比孚船舶管理</title>
{% block headjs%}
	{% include 'map/headjs.html' %}
{% endblock %}
</head>
<body >
{% block title %}
	<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/map/" id="logo">Belfu Ship WebManagement</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav navbar-right">
		<li class="dropdown">
			<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">我的船队<span class="caret"></span></a>
			<ul id="shiplist"class="dropdown-menu">
			{% for ship in latest_ship_list %}
			<li><a href="javascript:void(0);" onclick="get_ship_detail({{ ship.ship_id }})"><img src="{% static 'map/img/ship_16.ico' %}"></img>{{ ship.name_chinese }}</a></li>
			{% endfor %}
			</ul>
		</li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">船队管理<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li>
	            <a href="/map/ship_list/"><img src="{% static 'map/img/ship_16.ico' %}"></img>船只列表</a>
            </li>
			<li>
				<a href="/map/addship/"><img src="{% static 'map/img/ship_16.ico' %}"></img>添加船只</a>
			</li>
          </ul>
        </li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">综合信息<span class="caret"></span></a>
          <ul class="dropdown-menu">
           <li>
            	<a href="/map/data_detail/1">
							<i class="glyphicon glyphicon-calendar"></i>
							图表统计
				</a>
            </li>
            <li role="separator" class="divider"></li>
            <li>
            		<a href="#">
							<i class="glyphicon glyphicon-fire"></i>
							关于系统
					</a>
            </li>
          </ul>
        <li>
	        <a type="button" class="btn btn-default"  onclick="javascript:window.location.href='/accounts/logout/';">注销</a>
        </li>
      </ul>
    </div>
  </div>
</nav>
{% endblock %}
{% block navbar %}
	<div class="container-fluid">
		<div class="row">
			{% block window %}
			<div id="baidu" style="height: 92%"　class="col-md-12">
			</div>
			{% endblock %}
		</div>
	</div>
{% endblock %}
{% block modal_js %}
<script type="text/javascript" src="{% static 'map/js/map.js' %}"></script>
<script type="text/javascript">
  var select_history_point = [] 
</script>
{% if history_line%}
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=RfYi5LFm8OtfKdcUiVPqTfC0ucVV3ElG"></script>
<script type="text/javascript">
  var map = init('{{ history_line.0.longitude }}', '{{ history_line.0.latitude }}');
</script>
{% for point in history_line %}
<script type="text/javascript">
select_history_point.push(new BMap.Point('{{ point.longitude }}', '{{ point.latitude}}'))
</script>
{% endfor %}
<script type="text/javascript">
  var curve = new BMapLib.CurveLine(select_history_point, {strokeColor:"black", strokeWeight:3, strokeOpacity:0.5});
  map.addOverlay(curve);
</script>
{% endif %}
{% endblock %}
</body>
</html>
